/* 存放订单管理相关路由 */

import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const ORDER: AppRouteRecordRaw = {
  path: '/order',
  name: 'order',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '订单管理',
    requiresAuth: true,
    icon: 'icon-file',
    order: 1,
    hideInMenu: false,
    key: '2',
  },
  redirect: {
    name: 'OrderBaseSetting',
  },
  children: [
    {
      path: '/order/order-base-setting',
      name: 'OrderBaseSetting',
      component: () => import('@/views/order-management/base-setting/index.vue'),
      meta: {
        locale: '基础设置',
        requiresAuth: true,
        icon:'icon-share-alt',
        roles: ['*'],
        hideInMenu: false,
      }
    },

    // 客户需求
    {
      path: '/order/client-demand',
      name: 'ClientDemand',
      // component: () => import('@/views/homepage/client-management/index.vue'),
      meta: {
        locale: '客户需求',
        requiresAuth: true,
        icon: 'icon-ordered-list',
        roles: ['*'],
        hideInMenu: false,
      },
      children: [
        {
          path: 'demand-list',
          name: 'DemandList',
          component: () => import('@/views/order-management/client-demand/demand-list/index.vue'),
          meta: {
            locale: '需求列表',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
        {
          path: 'demand-review',
          name: 'DemandReview',
          component: () => import('@/views/order-management/client-demand/demand-review/index.vue'),
          meta: {
            locale: '需求评审列表',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
      ]
    },

    // 客户订单
    {
      path: '/order/client-order',
      name: 'ClientOrder',
      // component: () => import('@/views/homepage/client-management/index.vue'),
      meta: {
        locale: '客户订单',
        requiresAuth: true,
        icon: 'icon-idcard',
        roles: ['*'],
        hideInMenu: false,
      },
      children: [
        {
          path: 'Order-waitOk-order',
          name: 'OrderWaitOk',
          component: () => import('@/views/order-management/client-order/waitOk-order/index.vue'),
          meta: {
            locale: '待确认订单',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
        {
          path: 'Order-waitProduct-order',
          name: 'OrderWaitProduct',
          component: () => import('@/views/order-management/client-order/waitProduct-order/index.vue'),
          meta: {
            locale: '待生产订单',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
        {
          path: 'Order-producting-order',
          name: 'OrderProducting',
          component: () => import('@/views/order-management/client-order/producting-order/index.vue'),
          meta: {
            locale: '生产中订单',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
        {
          path: 'Order-isOk-order',
          name: 'OrderIsOk',
          component: () => import('@/views/order-management/client-order/isOk-order/index.vue'),
          meta: {
            locale: '已完成订单',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
      ]
    },


    // 客户管理
    {
      path: '/order/client-management',
      name: 'ClientManagement',
      // component: () => import('@/views/homepage/client-management/index.vue'),
      meta: {
        locale: '客户管理',
        requiresAuth: true,
        icon: 'icon-user-group',
        roles: ['*'],
        hideInMenu: false,
      },
      children: [
        {
          path: 'client-setting',
          name: 'ClientSetting',
          component: () => import('@/views/order-management/client-management/client-setting/index.vue'),
          meta: {
            locale: '基础设置',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
        {
          path: 'client-list',
          name: 'ClientList',
          component: () => import('@/views/order-management/client-management/client-list/index.vue'),
          meta: {
            locale: '客户列表',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
        {
          path: 'client-blacklist',
          name: 'ClientBlacklist',
          component: () => import('@/views/order-management/client-management/client-blacklist/index.vue'),
          meta: {
            locale: '黑名单列表',
            requiresAuth: true,
            roles: ['*'],
            hideInMenu: false,
          },
        },
      ]
    },
  ],
};

export default ORDER;
